<?php
include "includeFiles.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<Link href="../uploadfile/ico/<?php echo $C['ICO'];?>" rel="Shortcut Icon">
<meta name="Keywords" content="<?php echo $C['Keywords'];?>">
<meta name="description" content="<?php echo $C['Description'];?>">
<Meta name="Copyright" Content="<?php echo $C['CopyRight'];?>">
<title>注册模板</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<link charset="utf-8" rel="stylesheet" href="css/alipay.css">
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script src="./admin/js/checkSubmit.js"></script>
<script language="javascript">
	 function checkContent(dom){
	if(!check_empty(dom.user_email,"邮箱不能为空！")) return false;
	if(!check_isemail(dom.user_email,"邮箱格式不正确！")) return false;
	if(!check_empty(dom.user_name,"密码不能为空！")) return false;
	if(!check_empty(dom.user_pws,"密码不能为空！")) return false;
	if(!check_empty(dom.user_pws2,"确认密码不能为空！")) return false;
	if(!check_empty(dom.user_truename,"网店负责人不能为空！")) return false;
	if(!check_empty(dom.user_intro,"常用银行账号不能为空！")) return false;
		
	
	if(!check_empty(dom.authcode,"验证码不能为空！")) return false;
		return true;
	 }
</script>
<script type="text/javascript">
<!--

$(document).ready(function(){
	//$(".mh_zx_ct:gt(0)").hide();
	var opt=$(".mh_zx_box ul li");
	opt.hover(function(){
		//alert($(this));
		$(this).addClass('one').siblings().removeClass('one');
		var opt_index=opt.index(this);
		$(".mh_zx_ct").eq(opt_index).show().siblings().hide();
	});
	$(".nav_green").mouseover(function(){
		$("#nav_more").show();
	}).mouseout(function(){
		var timer=window.setTimeout(function(){
			$("#nav_more").hide();	
		},1000)
		$(".nav_green li").mouseover(function(){
			window.clearTimeout(timer);
			//$("#nav_more").show();
		})
	})
	$(".nav_green li").mouseout(function(){
		$("#nav_more").hide();	
	})

});
//-->
</script>
<script type="text/javascript">
$(document).ready(function(){
	$("form :input:not('[type=button]'):not('[type=reset]')").each(function(){
		$(this).parent().append("<strong class='redSta'>*</strong>");
	});
	$("#username").blur(function(){
		var pattern=/^([0-9a-zA-Z])\w{5,}/;
		if(!pattern.test(this.value)){
			$(this).parent().find(".tip").remove();
			var judge=/[^[0-9a-zA-Z]]/;
			if(judge.test(this.value)){
				$(this).parent().append("<span class='tip tip1'>必须以字符或者数字开头</span>");
			}else{
				$(this).parent().append("<span class='tip tip1'>用户名不能少于六位</span>");
			}
		}else{
			$(this).parent().find(".tip").remove();
			$(this).parent().append("<span class='tip tip2'>正确</span>");		
		}
	});
	$("#pwd").blur(function(){
		var pattern=/^([0-9a-zA-Z]){5,10}/;
		if(!pattern.test(this.value)){
			$(this).parent().find(".tip").remove();
			$(this).parent().append("<span class='tip tip1'>密码为5-10位数字或字母的结合</span>");
		}else{
			$(this).parent().find(".tip").remove();
			$(this).parent().append("<span class='tip tip2'>正确</span>");
			$("#pwd2").attr("disabled",false)	
		}
	});
	$("#pwd2").blur(function(){
		if(this.value==$("#pwd").val()){
			$(this).parent().find(".tip").remove();
			$(this).parent().append("<span class='tip tip2'>正确</span>");				
		}else{
			$(this).parent().find(".tip").remove();
			$(this).parent().append("<span class='tip tip1'>两次密码不相同</span>");					
		}
	});		
	$("#mail").blur(function(){
		var pattern=/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/;
		if(!pattern.test(this.value)){
			$(this).parent().find(".tip").remove();
			$(this).parent().append("<span class='tip tip1'>不是正确的邮箱格式</span>");
		}else{
			$(this).parent().find(".tip").remove();
			$(this).parent().append("<span class='tip tip2'>正确</span>");		
		}
	});
})


</script>
<script type="text/javascript">
$(document).ready(function(){
	$(":input").focus(function(){
				$(this).addClass('addFocus');
				if($(this).val()==this.defaultValue){
					$(this).val("");
				}
				
			}).blur(function(){
				$(this).removeClass('addFocus');
				if($(this).val()==""){
					$(this).val(this.defaultValue);
				}					
			})
})
</script>
</head>
<body id="mainbody">
<?php include_once('header.php');?>
<!--#头部导航-->
<!--主体布局-->
<div class="main">
<div class="gehang"></div>
<div class="tjzc"></div>
<div class="about3">
  <?
if($_POST['action'] == 'reg'){
	 $info->usereg($_POST); 
	 }
?>
  <form id="formpersonal" method="POST" onsubmit="return checkContent(this);">
    <div class="box">
      <div class="main3">
        <input name="action" type="hidden" value="reg"  />
        <div class="one">
          <label for="username"> 我的邮箱：</label>
          <input type="text" id="user_email" name="user_email" class="text" tabindex="1" style="ime-mode:disabled"/>
          
        </div>
		
        <div class="one">
          <label for="username">会员名：</label>
          <input type="text" id="user_name" name="user_name" class="text" tabindex="1" style="ime-mode:disabled"/>
          </div>
		  
        <div class="one">
          <label for="username"> 请输入密码：</label>
          <input type="password" id="user_pws" name="user_pws" class="text" tabindex="2" style="ime-mode:disabled;"
                           onpaste="return  false" autocomplete="off"/>
          </div>
        <div class="one">
          <label for="username">请确认密码：</label>
          <input type="password" id="user_pws2" name="user_pws2" class="text" tabindex="3" onpaste="return  false" autocomplete="off"/>
          </div>
        <div class="one">
          <label for="username">网店名称：</label>
          <input type="text" id="user_shopname" name="user_shopname" class="text" tabindex="1" style="ime-mode:disabled"/>
          <div class="one">
            <label for="username"> 网店负责人：</label>
            <input type="text" id="user_truename" name="user_truename" class="text" tabindex="1" style="ime-mode:disabled"/>
            </div>
          <div class="one">
            <label for="username"> 联系电话：</label>
            <input type="text" id="user_mobile" name="user_mobile" class="text" tabindex="1" style="ime-mode:disabled"/>
          </div>
          <div class="one">
            <label for="username"> 联系QQ号：</label>
            <input type="text" id="user_qq" name="user_qq" class="text" tabindex="1" style="ime-mode:disabled"/>
          </div>
          <div class="one">
            <label for="username"> 网店属性：</label>
            <input type="text" id="shopattr" name="shopattr" class="text" tabindex="1" style="ime-mode:disabled"/>
          </div>
          
          
          <div class="one">
            <label for="username">常用银行账号：</label>
            <input type="text" id="user_intro" name="user_intro" class="text" tabindex="1" style="ime-mode:disabled"/>
          </div>
          
            <div class="one">
            <label for="username">县份、区域：</label>
            
   广东省 
	  <select name="s_city" id="s_city">
       <option value=''>
	       请选择
	      </option>
	    <?php	
		$SQL=" select * from hy_b_city where ParentID =116  ";
		$objDb->query($SQL);
		$result = $objDb->get_data();
		if($result){
		foreach($result as $key=>$value){
	 ?>
	    <option value="<?=$value['CityID']?>">
	      <?=$value['CateName']?>
	      </option>
	    <? }}?>
      </select>
      
	   <select name="s_county" id="s_county">
	    <option value=''>
	       请选择
	      </option>
      </select>
          
           <select name="s_qu" id="s_qu">
	    <option value=''>
	       请选择
	      </option>
      </select>        
          </div>
          <script>
          
$('#s_city').change( function () { 
		$.ajax({
		   type: "get",
		   url: "selectcity.php",
		   data: "pid="+this.value,
		   success: function(msg){
			  // alert(msg);
			    $('#s_county').html(msg);
		   }
		});
});


$('#s_county').change( function () { 
		$.ajax({
		   type: "get",
		   url: "selectcity.php",
		   data: "pid="+this.value,
		   success: function(msg){
			    $('#s_qu').html(msg);
//			 alert( "Data Saved: " + msg );
		   }
		});
});



          </script>
          <div class="one">
            <label for="username"> 验证码：</label>
            <input type="text" id="authcode" style="ime-mode:disabled" name="authcode" class="text text-1"
                       tabindex="5" autocomplete="off" MaxLength="6"/>
            
          <a href="#" onclick="this.firstChild.src='admin/seccode.php?update=' + Math.random();return false;"><img align="absmiddle" id="authcodepic" src="admin/seccode.php?update=<?php echo time(); ?>" border="0" /></a> &nbsp;看不清？<a href="javascript:;" onclick="changeAuthcode();">换一张</a>
          <script>
			     function changeAuthcode(){
				    var newsrc = './admin/seccode.php?update=' + Math.random();
				    var a=  $('#authcodepic').attr('src',newsrc);
					return false;
				 }
			  </script>
          <br/>
          *为必填项 </div>
      </div>
    </div>
    <div class="dxsm">提交注册申请</div>
    <div class="tjzcsq">
      <input type="image"  src="images/tjsq.jpg" id="registsubmit"   />
    </div>
  </form>
  <div class="gehang"></div>
  <div style="width:980px;height:100%;overflow:hidden;margin-top:10px"> <img src="images/copy_line.jpg" /><br />
    <br />
    <br />
    <img src="images/copy.jpg" />
    <?php include_once('help.php');?>
    <img src="images/copy_line.jpg" /> </div>
</div>
<!--#主体布局-->
<div class="clear"></div>
<?php include_once('footer.php');?>
</body>
</html>
